package book;

public class Book {
    private String title;//书籍名称
    private String author;//作者
    private int price;//价格
    private String type;//类型
    private boolean BeBorrowed;//是否被借出

    public Book(String title, String author, int price, String type, boolean beBorrowed) {
        this.title = title;
        this.author = author;
        this.price = price;
        this.type = type;
        BeBorrowed = beBorrowed;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean isBeBorrowed() {
        return BeBorrowed;
    }

    public void setBeBorrowed(boolean beBorrowed) {
        BeBorrowed = beBorrowed;
    }

    @Override
    public String toString() {
        return "Book{" +
                "title='" + title + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ", BeBorrowed=" + BeBorrowed +
                '}';
    }
    public boolean beBorrowed(){
        return isBeBorrowed();
    }
}
